<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../static/knockout-3.3.0.js">
	
</script>
</head>
<body>
	<input type="text" data-bind="value:firstName" />
	<input type="text" data-bind="value:lastName">
	<span data-bind="text:fullName"></span>

</body>
<script type="text/javascript">
	// 	var coumputModel = {
	// 		firstName : ko.observable("a"),
	// 		lastName : ko.observable("v"),
	// 		fullName : ko.observable("av")
	// 	};
	// 	ko.applyBindings(coumputModel);

	function computeModel() {
		this.firstName = ko.observable("");
		this.lastName = ko.observable("");
		this.fullName = ko.computed(function() {
			return this.firstName() + "--" + this.lastName();
		}, this);
	}
	ko.applyBindings(computeModel);
	// 	function AppViewModel() {
	// 		var self = this;
	// 		self.firstName = ko.observable('Bob');
	// 		self.lastName = ko.observable('Smith');
	// 		self.fullName = ko.computed(function() {
	// 			return self.firstName() + " " + self.lastName();
	// 		});
	// 	}
</script>
</html>